<!DOCTYPE html>
<html>
<head>
  
    <link rel="stylesheet" type="text/css" href="__ADMIN__/Css/bootstrap.min.css" />
     <link rel="stylesheet" type="text/css" href="__ADMIN__/Css/ui.css" />
      <link rel="stylesheet" type="text/css" href="__ADMIN__/Css/Admin-default.css" />
   
</head>
<body>
<div class="page-content-wrap">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="panel panel-default">
                                <div class="panel-body">
<form action="{:U('topic/delete')}" method="post">
<div class="table-tools">
    <button type="submit" class="btn btn-primary" title="删除勾选的话题"><i class="glyphicon glyphicon-remove"></i> 删 除 </button>
    <a href="{:U('topic/add')}" class="btn btn-info" title="添加话题"><i class="fa fa-copy"></i> 添 加 </a>
    <p>话题列表</p>
</div>

<table id="questionnaire-table" class="table table-striped table-hover table-condensed datatable">
    <thead>
        <tr>
            <th>序号</th>
            <th>类型</th>
            <th>标题</th>
            <th>创建日期</th>
            <th>作者</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    	<volist name="topic" id="vo">
    		<tr>
    			<td><input name='id[]' type="checkbox" value="{$vo.id}" /> {$i}</td>
    			<td>
                            <span class="label label-danger"><i class="fa fa-tag"></i>
                            <switch name="vo.type">
   							 <case value="0">文章</case>
   							 <case value="1">投票</case>
    						
							</switch>
                            </span>
                     
    			</td>
    			<td class="questionnaire_name">{$vo.title}</td>
    			<td class="questionnaire_desc">{$vo.addtime|date=('Y年m月d日'),###}</td>
    			<td class="questionnaire_desc">{$vo.author}</td>
    			
    			<td>
                    <a href="{:U('topic/edit', array('id' => $vo['id']))}" class="btn btn-default btn-rounded btn-condensed btn-sm" title="编辑问卷"><span class="fa fa-pencil"></span>
                    </a>
                    
                   <eq name="vo.type" value="1"> 
                   <a href="{:U('Questions/index', array('questionnaire_id' => $vo['questionnaires_id']))}" class="btn btn-default btn-rounded btn-condensed btn-sm" title="问卷配题"><span class="fa fa-list-ul"></span></a>
                   </eq>
                    <a href="{:U('topic/comment', array('id' => $vo['id']))}" class="btn btn-default btn-rounded btn-condensed btn-sm" title="查看评论"><span class="fa fa-list-ul"></span></a>
                    <a href="{:U('topic/delete', array('id' => $vo['id']))}" class="btn btn-danger btn-rounded btn-condensed btn-sm" title="删除问卷"><span class="fa fa-times"></span></a>
    			</td>
    		</tr>
    	</volist>
    </tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>